<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!--临时查询form表单,可以增加一些分页的查询参数等,如果某一操作触发当前页面刷新,默认情况下提交此form进行查询-->
<form id="pagerForm" method="GET" action="${ctx }/appointment/show">
    <input type="hidden" name="pageNum" value="1"/><!--【必须】value=1可以写死-->
    <input type="hidden" name="startTime" value=""/>
    <input type="hidden" name="endTime" value=""/>
    <input type="hidden" name="tchId" value=""/>
    <input type="hidden" name="stuId" value=""/>
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" method="GET" action="${ctx }/appointment/show">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        开始时间：<input type="text" name="startTime" class="date textInput readonly" value="${startTime}" maxlength="50"/>
                    </td>
                    <td>
                        结束时间：<input type="text" name="endTime" class="date textInput readonly" value="${endTime}" maxlength="50"/>
                    </td>
                    <td>
                        老师ID：<input type="text" name="tchId" value="${tchId}" maxlength="50"/>
                    </td>
                    <td>
                        学生ID：<input type="text" name="stuId" value="${stuId}" maxlength="50"/>
                    </td>
                    <td><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></td>
                </tr>
            </table>
        </div>
    </form>
</div>

<div class="pageContent">
    
    <table class="table" width="100%" layoutH="88">
        <thead>
        <tr>
            <th width="30">序号</th>
            <th width="120">老师名称</th>
            <th width="200">开始上课时间</th>
            <th width="200">结束上课时间</th>
            <th>上课状态</th>
            <th width="80" align="center">章节名称</th>
            <th width="80" align="center">操作</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${page.data}" var="classroom" varStatus="status">
            <tr target="switch_id" rel="${classroom.id}">
                <td>${status.index+1}</td>
                <td>${classroom.tchName}</td>
                <td><fmt:formatDate value="${classroom.startTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                <td><fmt:formatDate value="${classroom.endTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                <td>${classroom.statusStr}</td>
                <td>${classroom.chapterName}</td>
                <td>
                    
                </td>
            </tr>
        </c:forEach>

        </tbody>
    </table>
<div class="panelBar">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
        <span>条，共${page.count }条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${page.count }" numPerPage="20" pageNumShown="10" currentPage="${page.page }"></div>
</div>
</div>
